package com.chaucer.demo.service;

import com.chaucer.demo.entity.HelloWorldEntity;
import com.chaucer.demo.mapper.HelloWorldMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Description TODO
 * @Author Chaucer
 * @Date 2021/9/3 23:59
 */
@Service
public class HelloService {
    @Resource
    private HelloWorldMapper helloWorldMapper;

    public void save(HelloWorldEntity helloWorld) {
        helloWorldMapper.insert(helloWorld);
    }
    public void update(HelloWorldEntity helloWorld) {
        helloWorldMapper.updateById(helloWorld);
    }
    public HelloWorldEntity findById(Long id) {
        return helloWorldMapper.findById(id);
    }

}